<template>
	<view>
		<view class="wrap">
			<view class="swiper">
				<u-swiper :height="370" :list="list" :effect3d="true"></u-swiper>
			</view>
			<view class="main">
				<FileStatistics></FileStatistics>
				<Weather></Weather>
			</view>
			<LocationPlan></LocationPlan>
		</view>
	</view>
</template>

<script>
	import Weather from '../../components/weather.vue'
	import LocationPlan from '../../components/location-plan.vue'
	import FileStatistics from '../../components/fire-statistics.vue'
	export default {
		components: {
			Weather,
			LocationPlan,
			FileStatistics
		},
		data() {
			return {
				list: [{
						image: 'http://n1-q.mafengwo.net/s9/M00/27/0E/wKgBs1bJrb2AUMk2ACsjB1zo_jo80.jpeg?imageMogr2%2Fthumbnail%2F%21690x450r%2Fgravity%2FCenter%2Fcrop%2F%21690x450%2Fquality%2F90%7Cwatermark%2F1%2Fimage%2FaHR0cDovL2IxLXEubWFmZW5nd28ubmV0L3MxMS9NMDAvNDQvOUIvd0tnQkVGc1A1UnlBRHY3cEFBQUhaWlVQUmxROTkwLnBuZw%3D%3D%2Fgravity%2FSouthEast%2Fdx%2F10%2Fdy%2F11',
					},
					{
						image: 'https://tse4-mm.cn.bing.net/th/id/OIP.vqatVas1YNgGc7AIZHOrCwHaEY?pid=Api&rs=1',
					},
					{
						image: 'https://img.pconline.com.cn/images/upload/upc/tx/photoblog/1905/31/c0/150471410_1559241235428_mthumb.jpg',
					}
				],
			}
		},
		//当页面加载时
		onLoad() {
			var cache = uni.getStorageSync('USER_INFO')
			console.log(cache)
			if (cache) {
				console.log("已经存在缓存")
				this.decide = true
			} else {
				console.log("没有拿到缓存,需要登录")
				uni.reLaunch({
					url: '../self/self'
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	$wrap-bg-color: #F1F1F1;

	.wrap {
		background-color: $wrap-bg-color;

		.swiper {
			margin-bottom: $module-margin-bottom;
		}

		.main {
			padding: $page-padding;
		}
	}
</style>
